Skip to content

[None][fix] Apply MSA patch in place so it lands regardless of wheel build#16822

Merged
pcicotti merged 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:user/brb/always-apply-patch
Jul 24, 2026
Merged

[None][fix] Apply MSA patch in place so it lands regardless of wheel build#16822
pcicotti merged 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:user/brb/always-apply-patch

Conversation

@brb-nv

@brb-nv brb-nv commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Description

The downstream MSA patch was staged and applied only inside the wheel-build branch of build_wheel.py, so -s (skip wheel) and editable installs never got it, and the runtime importer (which prepends 3rdparty/MSA/python to sys.path) used the unpatched submodule anyway.

Apply the patch in place on the 3rdparty/MSA submodule right after submodule init, guarded by a git-apply reverse-check for idempotency, so every consumer sees the patched fmha_sm100 sources. Drop the TRTLLM_MSA_PACKAGE_DIR env-var handoff and the build-dir staging copy.

Also add a fail-fast runtime guard in msa_utils.require_msa_module: on first import it verifies the loaded fmha_sm100 carries the patch symbol and otherwise raises an actionable error naming the loaded module file.

Test Coverage

N/A

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@brb-nv
brb-nv requested review from a team as code owners July 24, 2026 03:19
@brb-nv
brb-nv requested review from pcicotti, peihu-nv and zheyuf and removed request for a team, PerkzZheng, QiJune, mzweilz, niukuo, schetlur-nv and yunruis July 24, 2026 03:20
@brb-nv
brb-nv requested a review from a team as a code owner July 24, 2026 03:27
@brb-nv
brb-nv requested review from joyang-nv and longlee0622 July 24, 2026 03:27
…build

The downstream MSA patch was staged and applied only inside the wheel-build
branch of build_wheel.py, so -s (skip wheel) and editable installs never got
it, and the runtime importer (which prepends 3rdparty/MSA/python to sys.path)
used the unpatched submodule anyway.

Apply the patch in place on the 3rdparty/MSA submodule right after submodule
init, guarded by a git-apply reverse-check for idempotency, so every consumer
sees the patched fmha_sm100 sources. Drop the TRTLLM_MSA_PACKAGE_DIR env-var
handoff and the build-dir staging copy.

Also add a fail-fast runtime guard in msa_utils.require_msa_module: on first
import it verifies the loaded fmha_sm100 carries the patch symbol and otherwise
raises an actionable error naming the loaded module file.

Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
@brb-nv
brb-nv force-pushed the user/brb/always-apply-patch branch from a03a427 to 1b3af35 Compare July 24, 2026 03:39
@brb-nv
brb-nv removed the request for review from a team July 24, 2026 03:41
@pcicotti
pcicotti merged commit 68bc2ce into NVIDIA:feat/m3_with_msa Jul 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants